-
Notifications
You must be signed in to change notification settings - Fork 353
✨ Support for Featherless.ai as inference provider. #1310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Support for Featherless.ai as inference provider. #1310
Conversation
Hi @wxgeorge, import * as FeatherlessAI from "../providers/featherless-ai";
...
export const PROVIDERS: Record<InferenceProvider, Partial<Record<InferenceTask, TaskProviderHelper>>> = {
...
"featherless-ai": {
"conversational": new FeatherlessAI.FeatherlessAIConversationalTask(),
"text-generation": new FeatherlessAI.FeatherlessAITextGenerationTask(),
},
... 2 - Update import { BaseConversationalTask, BaseTextGenerationTask } from "./providerHelper";
const FEATHERLESS_API_BASE_URL = "https://api.featherless.ai";
export class FeatherlessAIConversationalTask extends BaseConversationalTask {
constructor() {
super("featherless-ai", FEATHERLESS_API_BASE_URL);
}
}
export class FeatherlessAITextGenerationTask extends BaseTextGenerationTask {
constructor() {
super("featherless-ai", FEATHERLESS_API_BASE_URL);
}
} and that's it :) let us know if you need any help! you can find more details in the documentation here : https://huggingface.co/docs/inference-providers/register-as-a-provider#2-js-client-integration |
(sorry for the moving parts @wxgeorge – we can help move this PR over the finish line if needed) |
40c84bd
to
85cc8c0
Compare
all good @julien-c @julien-c @hanouticelina - updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there,
Thank you for your contribution!
I have left a few minor comments to be addressed before we can proceed with this PR.
Can you also update the README.md
and add the relevant informations about Featherless there, please?
Additionally, before merging, you need to run the tests in cache
mode to update the tapes.json
file.
You can do so by running the following command in your terminal:
VCR_MODE=cache pnpm run test -t "Featherless"
You'll a HF_FEATHERLESS_KEY
set in your environment
0b59d13
to
5e48368
Compare
@SBrandeis - thanks for the feedback. I think I've covered them all! |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! thank you @wxgeorge
Implements support for Featherless.ai as inference provider fully for chat and partially for completions (streaming completions to be covered in a future PR)